from conans import ConanFile


class FunctionalPlusConan(ConanFile):
    name = "functionalplus"
    license = "Boost Software License 1.0"
    url = "https://github.com/Dobiasd/FunctionalPlus"
    description = "Functional Programming Library for C++. Write concise and readable C++ code."
    exports_sources = ["include*", "LICENSE"]
    options = {
        "build_unittest": [True, False],
    }
    default_options = "build_unittest=False",
    generators = ["cmake"]

    def requirements(self):
        if self.options.build_unittest:
            self.requires.add('doctest/2.3.4@bincrafters/stable')

    def package(self):
        self.copy("*LICENSE", dst="licenses")
        self.copy("*.h", src=".")
        self.copy("*.hpp", src=".")
        self.copy("*.autogenerated_defines", src=".")
